﻿#region Header

//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//namespace nCodeGeneratingTool
//{
//    [Export(typeof(ICompletionSourceProvider))]
//    [ContentType("spark")]
//    [ContentType("HTML")]
//    [Name("Spark Tag Completion")]
//    class CompletionListener : ICompletionSourceProvider
//{
//[Import]
//internal ITextStructureNavigatorSelectorService TextNavigator { get; set; }
//#region ICompletionSourceProvider Members
//public ICompletionSource TryCreateCompletionSource(ITextBuffer textBuffer)
//{
//return new CompletionSource(TextNavigator, textBuffer);
//}
//#endregion
//}
//}
//namespace nCodeGeneratingTool
//{
//public class CompletionSource : ICompletionSource
//{
//private bool _isDisposed;
//private ITextBuffer _textBuffer;
//public CompletionSource(ITextBuffer textBuffer)
//{
//_textBuffer = textBuffer;
//}
//#region ICompletionSource Members
//public void AugmentCompletionSession(ICompletionSession session, IList completionSets)
//{
//SparkSyntaxTypes syntaxType;
//IViewExplorer viewExplorer;
//session.Properties.TryGetProperty(typeof(SparkSyntaxTypes), out syntaxType);
//session.Properties.TryGetProperty(typeof(ViewExplorer), out viewExplorer);
//CompletionSet sparkCompletions = SparkCompletionSetFactory.GetCompletionSetFor(session, _textBuffer, viewExplorer, syntaxType);
//if (sparkCompletions != null) completionSets.Add(sparkCompletions);
//}
//public void Dispose()
//{
//if (_isDisposed) return;
//GC.SuppressFinalize(this);
//_isDisposed = true;
//}
//#endregion
//}
//}
//}

#endregion Header